package com.audaque.springboot.foshanupload.web.rocketmqdemo.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;


@Slf4j
@Service
//会自动创建消费者组和自定义主题对应的retry主题，，但默认不会自动创建自定义主题，可以配置broker开启自动创建主题
@RocketMQMessageListener(topic = "syncSendOrderly-message", consumerGroup = "syncSendOrderly-message-push")
public class SyncSendOrderlyMessageListener implements RocketMQListener<String> {
    public void onMessage(String message) {
        log.debug("received message: {}", message);
    }
}
